package spa_data;

public abstract class Mammal implements Ianimal
	{
	//Instance variables(Encapsulated)
	private String name;
	private int sightings;
	private String species;

	
	//Constructor
	public Mammal(String name){
		this.name = name;
		this.sightings=0;
	}
	
	//Methods
	public String speak() throws IllegalMammalException
	{
		throw new IllegalMammalException("Mammal does not exist!");
	}
	
	public void sighted()
	{
		sightings++;		
	}
	
	public String toString()
	{
		return "Animal: "+name+"\t"+"Sightings: "+sightings;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public int sightings(){
		return this.sightings;
	}
	
	public String getSpecies() throws IllegalMammalException
	{
		throw new  IllegalMammalException("Abstract mammal class has no species");
	}
	
		

	

}
